﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using DataLib.Common;
using System.Drawing;
using DataLib.Accounts.Bus;

namespace Ewts.BaseData
{
    public partial class TransportCompanyList : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }

        protected void BindData()
        {
            DataTable dt = new DataLib.BLL.TransportCompany().GetList("").Tables[0];
            reptTrans.DataSource = dt;
            reptTrans.DataBind();
        }

        protected string GetCustName(string cusID)
        {
            string cusName = "";
            if (cusID != null && cusID.Trim() != "")
            {
                DataLib.Model.Cumtomer cumModel = new DataLib.BLL.Cumtomer().GetModel(int.Parse(cusID));
                if (cumModel != null)
                {
                    cusName = cumModel.companyname;
                }
            }
            
            return cusName;
        }

    }
}
